<center><b>{% if $is_show ==1 %}内容查看{%else%}{%$act_title%}表单{%/if%}</b></center>
<table border=1>
<form action="index.php?c=info_product&m={%$act%}&post=1" enctype="multipart/form-data" method=post name=frm>	
	<tr>
		<td>供应商</td>
		<td>			
			<select name="supplier_id" {% if $is_show ==1 %} readonly {%/if%}>
				<option value="0">-- 请选择 --</option>
				{%foreach from=$supplier_arr  item=list%}
				<option value="{%$list.supplier_id%}" {%if $supplier_id==$list.supplier_id%}selected{%/if%}>{%$list.supplier_name%}</option>
				{%/foreach%}
			</select>
		</td>
	</tr>
		<tr>
		<td>产品名称</td>
		<td><input type=text name="product_name" size=30 value='{%$product_name%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>产品型号</td>
		<td><input type=text name="product_model" size=30 value='{%$product_model%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>产品价格</td>
		<td><input type=text name="product_price" size=30 value='{%$product_price%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>进价</td>
		<td><input type=text name="product_purchase" size=30 value='{%$product_purchase%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>生产工期</td>
		<td><input type=text name="product_make_time" size=30 value='{%$product_make_time%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>库存</td>
		<td><input type=text name="product_num" size=30 value='{%$product_num%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>起订量</td>
		<td><input type=text name="product_order" size=30 value='{%$product_order%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>

		<tr>
		<td>分类</td>
		<td>
			<select name="type_id" {% if $is_show ==1 %} readonly {%/if%}>
				<option value="0">-- 请选择 --</option>
				{%foreach from=$ipt_arr item=ipt%}
				<option value="{%$ipt.type_id%}" {%if $type_id==$ipt.type_id%}selected{%/if%}>{%$ipt.type_name%}</option>
				{%/foreach%}
			</select>
		</td>
	</tr>
	
	<tr>
		<td>产品图片</td>
		<td>
			{%if $is_show%}
			{%if $image_arr%}
			<div id=preview>
				<div class=jqzoom id=spec-n1><IMG height=350
				src="{%$up_load_path%}{%$image_arr.0.image_url%}" jqimg="{%$up_load_path%}{%$image_arr.0.image_url%}" width=350>
				</div>
				<div id=spec-n5>
					<div class=control id=spec-left>
						<img src="{%$pic_path%}left.gif" />
					</div>
					<div id=spec-list>
						<ul class=list-h>
							{%foreach item=image from=$image_arr%}
							<li><img src="{%$up_load_path%}{%$image.image_url%}"> </li>
							{%/foreach%}
						</ul>
					</div>
					<div class=control id=spec-right>
						<img src="{%$pic_path%}right.gif" />
					</div>

			    </div>
			</div>
			<SCRIPT type=text/javascript>
				$(function(){			
				   $(".jqzoom").jqueryzoom({
						xzoom:400,
						yzoom:400,
						offset:10,
						position:"right",
						preload:1,
						lens:1
					});
					$("#spec-list").jdMarquee({
						deriction:"left",
						width:350,
						height:56,
						step:2,
						speed:4,
						delay:10,
						control:true,
						_front:"#spec-right",
						_back:"#spec-left"
					});
					$("#spec-list img").bind("mouseover",function(){
						var src=$(this).attr("src");
						$("#spec-n1 img").eq(0).attr({
							src:src.replace("\/n5\/","\/n1\/"),
							jqimg:src.replace("\/n5\/","\/n0\/")
						});
						$(this).css({
							"border":"2px solid #ff6600",
							"padding":"1px"
						});
					}).bind("mouseout",function(){
						$(this).css({
							"border":"1px solid #ccc",
							"padding":"2px"
						});
					});				
				})
				</SCRIPT>

			<SCRIPT src="{%$js_path%}163css.lib.js" type=text/javascript></SCRIPT>
			<SCRIPT src="{%$js_path%}163css.js" type=text/javascript></SCRIPT>
			{%else%}
			暂无图片
			{%/if%}
			{%else%}
			{%foreach item=image from=$image_arr %}
			{%$image.image_url%}--<a href="index.php?c=info_product&m=del_product_image&image_id={%$image.image_id%}">
				删除
			</a>  <br>
			{%/foreach%}
			<input type="file" name="pictures[]" /><br /> 
			  <input type="file" name="pictures[]" /><br /> 
			  <input type="file" name="pictures[]" /><br />
			{%/if%}
		</td>
	</tr>
		<tr>
		<td>产品备注</td>
		<td>
			<textarea cols="50" rows="5" class="" name="product_info" {% if $is_show ==1 %} readonly {%/if%}>{%$product_info%}</textarea>
		</td>
	</tr>
	
	<tr>
		<td>标签</td>
		<td><input type=text name="product_tag" size=55 value='{%$product_tag%}' {% if $is_show ==1 %} readonly {%/if%}>*以逗号分隔</td>
	</tr>
	
	<!--
		<tr>
		<td>product_department_tree</td>
		<td><input type=text name="product_department_tree" size=30 value='{%$product_department_tree%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>laster</td>
		<td><input type=text name="laster" size=30 value='{%$laster%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
		<tr>
		<td>update_time</td>
		<td><input type=text name="update_time" size=30 value='{%$update_time%}' {% if $is_show ==1 %} readonly {%/if%}></td>
	</tr>
	-->
		
		<tr>
		<td colspan=2 align=center>
		<input type=hidden name='product_id' id='product_id' value='{%$product_id%}'>
		{% if $is_show ==1 %}
		<input type="button" value="返回" class="btn" onclick="javascript:history.go(-1);">
		{% else %}
		<input type=submit value="提交" class="btn">&nbsp;&nbsp;
		<input type=reset value="重置" class="btn">
		{% /if %}
		</td>
	</tr>
</form>
</table>